package com.pig4cloud.pigx.wxApi.config;


import java.util.Arrays;

/**
 * 用户状态：1 启用  0 禁用
 */
public enum UserStatusEnum {
    DISABLE(0,"禁用"),
    ENABLE(1,"启用");

    private Integer code;
    private String desc;
    UserStatusEnum(Integer code, String desc) {
        this.code=code;
        this.desc=desc;
    }

    public UserStatusEnum getReadStatus(String code){
        UserStatusEnum[] values = UserStatusEnum.values();
        UserStatusEnum bindingServiceTypeEnum = Arrays.stream(values).filter(s -> s.getCode().equals(code)).findFirst().get();
        return bindingServiceTypeEnum;
    }


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
